import request from '@/utils/request'

// 查询学院列表
export function listCollege(query) {
  return request({
    url: '/employee/college/list',
    method: 'get',
    params: query
  })
}

// 查询学院详细
export function getCollege(id) {
  return request({
    url: '/employee/college/' + id,
    method: 'get'
  })
}

// 新增学院
export function addCollege(data) {
  return request({
    url: '/employee/college',
    method: 'post',
    data: data
  })
}

// 修改学院
export function updateCollege(data) {
  return request({
    url: '/employee/college',
    method: 'put',
    data: data
  })
}

// 删除学院
export function delCollege(id) {
  return request({
    url: '/employee/college/' + id,
    method: 'delete'
  })
}

// 导入
export function importData(data) {
  return request({
    url: '/employee/college/importData',
    method: 'post',
    data: data,
    headers: {
      "Content-Type": "multipart/form-data",//配置header，我们上传的文件编码格式就是multipart/form-data
    }
  })
}
